<?php

$mysql_host = "localhost";
$mysql_database = "group09_zxq_db";
$mysql_user = "326270_group09";
$mysql_password = "APMproject1";

//TODO: checks and error handling in the most important places;


/*
ALGORITHM:

1) select all data from the database from the table "location";

2) print all the information on the web browser's screen in a form of a table;

3) use this as a guide: http://lv.php.net/manual/en/function.mysql-query.php

*/



$link = mysql_connect($mysql_host, $mysql_user, $mysql_password);
if (!$link) {
  die('Could not connect to database: ' . mysql_error());
}
echo ("Connected to database successfully... <br/>");


$db = mysql_select_db($mysql_database, $link);
if (!$db) {
  mysql_error();
} else{
  echo("Selected database successfully... <br/>"); 
}

// HERE add all the tasks that are necessary for interaction with the database

mysql_close($link);

?>